/*  
 *  Nanjing JIYU Technology Co.,Ltd All rights reserved.
 *  Copyright (C) 2022 
 *  ==============================================================
 * 
 *  status.h
 *    底盘运行状态结构体类型
 *
 *  --------------------------------------------------------------
 *  
 */

#ifndef _STATUS_H
#define _STATUS_H

typedef enum
{
  automatic,
  controlled,
} control_mode_t;


typedef struct
{
  volatile control_mode_t control_mode;   /* 运行模式，自动or指令控制     */

  volatile unsigned char ctrl_cmd;        /* 指令控制下，来自上位机的指令 */

  volatile unsigned char location;        /* 自动运行时，当前所在位置     */
  volatile unsigned char destination;     /* 自动运行时，目标位置         */

  volatile unsigned char new_msg;         /* 未处理的新消息数量           */
} status_t;

extern status_t status;

#endif




